﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CIIS.Common;
using DevExpress.XtraEditors;

namespace CIIS
{
    public partial class ClueManage : Manage
    {
        public ClueManage()
        {
            InitializeComponent();

            InitUserControl();
        }

        private void InitUserControl()
        {
            InitButtonsWithEvent(new string[] { "添加" }, new EventHandler[] { btnAdd_click });

            InitParamControl(new bool[] { true, false, true, false, true, false },
                new string[] { "编号：", "", "姓名：", "", "嫌疑人姓名：", "" },
                new DropdownControlParam[] { null, null, null, null, null, null });

            InitGridViewDataColumns(new string[] { "选中", "序号", "线索编号", "姓名", "提供时间", "性质", "嫌疑人", "登记时间"},
                new string[] { "IsSelected", "", "", "", "", "", "", "" },
                null);

            InitGridViewOptColumnWithEvent(new string[] { "详情", "修改", "删除" },
                new EventHandler[] { linkDetail_click, linkModify_click, linkDelete_click });
        }

        void btnAdd_click(object sender, EventArgs ent)
        {
            Clue dlg = new Clue();
            dlg.OptType = EOperateType.Add;
            dlg.ShowDialog();
        }
        void linkDetail_click(object sender, EventArgs ent)
        {
            Clue dlg = new Clue();
            dlg.OptType = EOperateType.Detail;
            dlg.ShowDialog();
        }
        void linkModify_click(object sender, EventArgs ent)
        {
            Clue dlg = new Clue();
            dlg.OptType = EOperateType.Modify;
            dlg.ShowDialog();
        }
        void linkDelete_click(object sender, EventArgs ent)
        {
        }
    }
}
